import {ref, Ref} from "vue"

interface ActiveReturn {
    active: Ref<boolean>
    setActive: () => void
}

export function useActive(raw: boolean): ActiveReturn {
    const active = ref(raw)

    function setActive() {
        active.value = !active.value
    }

    return {
        active,
        setActive
    }
}